<template>
  <div class="table">
    <div class="tr bg-w">
      <div class="th">行业</div>
      <div class="th">企业</div>
      <div class="th">税收</div>
    </div>
    <div v-for="(item,index) in listData" :key="index">
      <div class="tr bg-g" v-if="index % 2 == 0">
        <div class="td">{{item.code}}</div>
        <div class="td">{{item.text}}</div>
        <div class="td">{{item.type+'万'}}</div>
      </div>
      <div class="tr" v-else>
        <div class="td">{{item.code}}</div>
        <div class="td">{{item.text}}</div>
        <div class="td">{{item.type+'万'}}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      listData: [
        { code: "01", text: "100", type: "3000" },
        { code: "02", text: "100", type: "3000" },
        { code: "03", text: "100", type: "3000" },
        { code: "04", text: "100", type: "3000" },
        { code: "05", text: "100", type: "3000" },
        { code: "06", text: "100", type: "3000" },
        { code: "07", text: "100", type: "3000" },
      ],
    };
  },
  created() {},
  methods: {},
};
</script>

<style scoped lang="less">
.table {
  border: 0px solid darkgray;
}
.tr {
  display: flex;
  width: 100%;
  justify-content: center;
  height: 30px;
  align-items: center;
}
.td {
  width: 40%;
  justify-content: center;
  text-align: center;
}
.bg-w {
  background: snow;
}
.bg-g {
  background: #e6f3f9;
}
.th {
  width: 40%;
  justify-content: center;
  background: #49a9ee;
  color: #fff;
  display: flex;
  height: 30px;
  align-items: center;
}
</style>
